<?php
	require_once dirname(__FILE__) . '/../../utils/Utils.php';
	//引入公共参数
	$constant = include(dirname(__FILE__) . '/../../AppletConstant.php');

	$utils =	new Utils();

	/**
	 *  红包 资格查询
	 *
	 */

	//调用地址
	$url = "https://open.95516.com/open/access/1.0/qual.select";
	
	//拼装参数Map
	$params 	=	array();
	$params["appId"] 			=	$constant['appId'];
	
	//资格池编号
	$params["qualNum"] 			=	"";

	//资格类型
	//固定值“open_id”、“mobile”、“card_no”
	$params["qualType"] 			=	"mobile";

	//资格值
	//（使用symmetricKey 对称加密，内容为base64格式）
	$params["qualValue"] 			=	"";

	//OAUTH2中获取的openId
	$params["backendToken"] 			=	$constant['backendToken'];

	//对称密钥加密
	$params = $utils->encryptedParamMap($constant['SYMMETRIC_KEY'], $params, array("qualValue"));

	//发送请求
	$resultStr 	=	$utils->sendPostGson($url,$params);
	print_r("-------获取RedPacketSelect信息: ".$resultStr." --------- ");
    exit();
	
?>
